package com.qf;

import redis.clients.jedis.Jedis;

/**
 * jedis基本使用
 */
public class JedisDemo1 {
    public static void main(String[] args) {
        //获取连接
        Jedis jedis = new Jedis("192.168.247.203",6379);

        //执行操作
        jedis.set("username","zhangsan");

        String username = jedis.get("username");
        System.out.println(username);


        //释放资源
        jedis.close();
    }
}
